<%@ page language="java" import="java.util.*,edu.fzu.fundmgr.domain.*"
	pageEncoding="utf-8"%>
<%
	List<Fund> funds = (List<Fund>) request.getAttribute("funds");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>基金产品查询</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">

		<script type="text/javascript">
	    function removeFund(fund_no){
	    
	       if(confirm("您真的要删除编号为 " + fund_no + " 的消费记录吗?")){
	          
	          location.href = "fundMgr?act=del&fund_no=" + fund_no;
	       }
	    }
	    
	    function updateFund(fund_no){
	    
	       location.href = "fundMgr?act=getFund&fund_no=" + fund_no;
	    }
	</script>
	</head>

	<body>

		<%
			if (funds.size() > 0) {
		%>
		<div class="content-box">
			<!-- Start Content Box -->

			<div class="content-box-header">

				<h3>
					基金产品查询
				</h3>

				<div class="clear"></div>

			</div>
			<!-- End .content-box-header -->

			<div class="content-box-content">

				<div class="tab-content default-tab" id="tab1">

					<table>

						<thead>
							<tr>
								<th>
									<input class="check-all" type="checkbox" />
								</th>
								<th>
									基金编号
								</th>
								<th>
									名称
								</th>
								<th>
									单价
								</th>
								<th>
									描述
								</th>
								<th>
									状态
								</th>
								<th>
									创建时间
								</th>
							</tr>

						</thead>

						<tfoot>
							<tr>
								<td colspan="6">
									<div class="bulk-actions align-left">
										<select name="dropdown">
											<option value="option1">
												Choose an action...
											</option>
											<option value="option2">
												Edit
											</option>
											<option value="option3">
												Delete
											</option>
										</select>
										<a class="button" href="#">Apply to selected</a>
									</div>

									<div class="pagination">
										<a href="#" title="First Page">&laquo; First</a><a href="#"
											title="Previous Page">&laquo; Previous</a>
										<a href="#" class="number" title="1">1</a>
										<a href="#" class="number" title="2">2</a>
										<a href="#" class="number current" title="3">3</a>
										<a href="#" class="number" title="4">4</a>
										<a href="#" title="Next Page">Next &raquo;</a><a href="#"
											title="Last Page">Last &raquo;</a>
									</div>
									<!-- End .pagination -->
									<div class="clear"></div>
								</td>
							</tr>
						</tfoot>

						<tbody>
							<%
								for (Fund fund : funds) {
							%>
							<tr>
								<td>
									<input type="checkbox" />
								</td>
								<td><%=fund.getFundNO()%></td>
								<td><%=fund.getFundName()%></td>
								<td><%=fund.getPrice()%></td>
								<td><%=fund.getDescription()%></td>
								<td><%=fund.getStatus()%></td>
								<td><%=fund.getCreatedDate()%></td>
								<td>
									<!-- Icons -->
									<a href="#" title="Edit"><img
											onclick="updateFund(<%=fund.getFundNO()%>);"
											src="resources/images/icons/pencil.png" alt="修改t" /> </a>
									<a href="#" title="Delete"><img
											onclick="removeFund(<%=fund.getFundNO()%>);"
											src="resources/images/icons/cross.png" alt="删除" /> </a>
								</td>
							</tr>
							<%
								}
							%>
						</tbody>

					</table>
				</div>
				<!-- End #tab1 -->
			</div>
			<!-- End .content-box-content -->

		</div>
		<!-- End .content-box -->
		<%
			} else {
		%>
		<span class="error">当前没有任何基金记录!</span>
		<%
			}
		%>
	</body>
</html>
